package com.zhentao.day02.pm;

public class Student  implements Comparable<Student>{
  // uTools  可以按 ALT + SPACE 实现调用程序, 里面内置 翻译及语音
  private int id ;
  private String name ;
  private int age ;
  private String sex ;
  private double score ;

  public Student() {
    super();
  }

  public Student(int id, String name, int age, String sex, double score) {
    super();
    this.id = id;
    this.name = name;
    this.age = age;
    this.sex = sex;
    this.score = score;
  }

  public int getId() {
    return id;
  }

  @Override
  public int compareTo(Student o) {
    // return this.age - o.age;
    // return (int) (this.score - o.score) ;
    // return  this.id - o.id ;
    return this.name.compareTo(o.name);
  }
}
